//package edu.sctu.zcy.month201506.day20150618.httptest;
//
//
//import org.apache.http.HttpEntity;
//
//import org.apache.http.client.methods.CloseableHttpResponse;
//import org.apache.http.client.methods.HttpGet;
//import org.apache.http.impl.client.CloseableHttpClient;
//
//import org.apache.http.impl.client.HttpClients;
//
//import java.io.IOException;
//import java.io.InputStream;
//
///**
// * Created by user24 on 2015/6/18.
// */
//public class ProgramEntry {
//
//    public static void main(String[] args) throws IOException {
//
//
//        CloseableHttpClient httpclient = HttpClients.createDefault();
//        HttpGet httpget = new HttpGet("http://localhost/");
//        CloseableHttpResponse response = null;
//        try {
//            response = httpclient.execute(httpget);
//        } catch (IOException e) {
//            e.printStackTrace();
//        }
//        try {
//            HttpEntity entity = response.getEntity();
//            if (entity != null) {
//                InputStream instream = entity.getContent();
//                try {
//                    // do something useful
//                } finally {
//                    instream.close();
//                }
//            }
//        } catch (IOException e) {
//            e.printStackTrace();
//        } finally {
//            response.close();
//        }
//
//
////        System.out.println(new HttpRequestGet().sendGet("http://www.baidu.com", "get"));
////        System.out.println(new HttpRequestPost().sendPost("http://api.ii.com.cn/openoauth", "get"));
//    }
//}
